<?php
	//pr($this->data);
	$j['id'] = $this->data['Task']['id'];
	
	//todo: hibakezelés
	$j['message']['message'] = isset($message) ? $message : '';
	$j['message']['integrityFault'] = $integrityFault;
	$j['hiba'] = isset($hiba) ? $hiba : false;

	$j['title'] = TASK_EDIT . ' / ' . __('Details', true);
	$j['start'] = substr($this->data['Task']['start'], 0, 10);

	$j['categories_id'] = $this->data['Task']['categories_id'];
	
	$j['priorities_id'] = $this->data['Task']['priorities_id'];
	$j['priority'] = $this->data['Priority']['priority'];	//title-hez szükség van rá
	
	$j['types_id'] = $this->data['Task']['types_id'];
	$j['types_css'] = ($this->data['Task']['types_id'] == $settings['task_type_finished']) ? CSS_TASK_FINISHED : '';	//css-hez szükség lesz rá
	
	$j['szulo'] = $szuloid;
	$j['task'] = html_entity_decode($this->data['Task']['task']);
	$j['tags'] = $this->data['Tag'];
	$j['details'] = html_entity_decode($this->data['Task']['details']);
	$j['due'] = $this->data['Task']['due'];
	$j['path'] = $this->data['Task']['path'];

	$j['closeable'] = $closeable;
	
	$j['quickinfo'] = isset($qi) ? $qi : null;
	
	if(isset($szuloTree)){
		$tree = '';
		foreach($szuloTree as $sz){
			if($sz['id'])
				$tree .= '<option value="'.$sz['id'].'" id="o'.$sz['id'].'">'.$sz['task'].'</option>' . "\n";
			}
			$j['szuloTree'] = $tree;
			}
		else
			$j['szuloTree'] = null;

	$j['submit'] = SAVE;
	$json = json_encode($j);
	
	print $javascript->object($json);
?>